import Cookies from 'js-cookie';
const { VITE_TOKEN_NAME } = import.meta.env;
const tokenCookie = {
  get() {
    let result;
    if (Cookies.get(VITE_TOKEN_NAME) !== 'undefined') {
      result = Cookies.get(VITE_TOKEN_NAME);
    }
    return result;
  },
  set(token) {
    return Cookies.set(VITE_TOKEN_NAME, token);
  },
  remove() {
    return Cookies.remove(VITE_TOKEN_NAME);
  }
};

export default tokenCookie;
